package com.yuanfeng.payment.controller;

import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 支付宝支付
 */
@CrossOrigin
@RestController
@RequestMapping("pay/aLiPay")
public class ALiPayController extends BaseController {

    /**
     * 支付宝回调
     *
     * @param request
     * @param response
     */
    @RequestMapping("/alipayNotifyUrl")
    public void alipayNotifyUrl(HttpServletRequest request, HttpServletResponse response) {
        aLiPayService.alipayNotifyUrl(request, response);
    }

    /**
     * plus会员 支付宝异步回调
     *
     * @param request
     * @param response
     * @return
     */
    @RequestMapping("/alipayPlusNotifyUrl")
    public void alipayPlusNotifyUrl(HttpServletRequest request, HttpServletResponse response) {
        aLiPayService.alipayPlusNotifyUrl(request, response);
    }
}
